#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void main()
{
	float mu = 1;
	float sum = 0;
	int flag = 1;
	float pi = 0;
	while (1 / mu >= 0.0001)
	{
		sum = sum + flag / mu;
		mu = mu + 2;
		flag = -flag;
	}
	printf("pi=%f\n", sum * 4);


}
